#pragma once

#include "NComponent.h"
#include "NFactory.h"

namespace Game
{
class NFileComponent : public NComponent
{
	RTTI_DECLARATIONS(NFileComponent, NComponent)
public:
	enum FileType
	{
		FileType_Invalid = 0,
		FileType_Sprite,
		FileType_Texture,
		FileType_Mesh,
		FileType_Material
	};
public:
	NFileComponent(void);

	virtual ~NFileComponent(void);

	virtual void Initialize(Engine::NEntity* owner);

	virtual void Deinitialize();

	virtual void Update(float gameTime);

	void SetFile(const char* file);
	
	std::string GetFile() const;

	void SetType(std::string type);
	
	void SetType(FileType type);

	FileType GetType() const {return mType;}

	void SetData(std::pair<std::string, std::string> data);

private:
	std::string mFilePath;
	FileType mType;
};
}

ConcreteFactory(NFileComponent, Game::NComponent, Game::NFileComponent);